home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Games / MAME / src / drivers / dotrikun.c < prev    next >
C/C++ Source or Header  |  2000-04-04  |  3KB  |  127 lines

  1. /***************************************************************************
  2.  
  3. Dottori Kun (Head On's mini game)
  4. (c)1990 SEGA
  5.  
  6. Driver by Takahiro Nogi (nogi@kt.rim.or.jp) 1999/12/15 -
  7.  
  8.  
  9. CPU   : Z-80 (4MHz)
  10. SOUND : (none)
  11.  
  12. 14479.MPR  ; PRG (FIRST VER)
  13. 14479A.MPR ; PRG (NEW VER)
  14.  
  15. * This game is only for the test of cabinet
  16. * BackRaster = WHITE on the FIRST version.
  17. * BackRaster = BLACK on the NEW version.
  18. * On the NEW version, push COIN-SW as TEST MODE.
  19. * 0000-3FFF:ROM 8000-85FF:VRAM(128x96) 8600-87FF:WORK-RAM
  20.  
  21. ***************************************************************************/
  22.  
  23. #include "driver.h"
  24. #include "vidhrdw/generic.h"
  25. #include "cpu/z80/z80.h"
  26.  
  27.  
  28. WRITE_HANDLER( dotrikun_videoram_w );
  29. void dotrikun_vh_screenrefresh(struct osd_bitmap *bitmap,int full_refresh);
  30. int dotrikun_vh_start(void);
  31. void dotrikun_vh_stop(void);
  32.  
  33. WRITE_HANDLER( dotrikun_color_w );
  34.  
  35.  
  36. static struct MemoryReadAddress readmem[] =
  37. {
  38.     { 0x0000, 0x3fff, MRA_ROM },
  39.     { 0x8000, 0x87ff, MRA_RAM },
  40.     { -1 }  /* end of table */
  41. };
  42.  
  43. static struct MemoryWriteAddress writemem[] =
  44. {
  45.     { 0x0000, 0x3fff, MWA_ROM },
  46.     { 0x8000, 0x87ff, dotrikun_videoram_w, &videoram, &videoram_size },
  47.     { -1 }  /* end of table */
  48. };
  49.  
  50. static struct IOReadPort readport[] =
  51. {
  52.     { 0x00, 0x00, input_port_0_r },
  53.     { -1 }    /* end of table */
  54. };
  55.  
  56. static struct IOWritePort writeport[] =
  57. {
  58.     { 0x00, 0x00, dotrikun_color_w },
  59.     { -1 }    /* end of table */
  60. };
  61.  
  62.  
  63. INPUT_PORTS_START( dotrikun )
  64.     PORT_START
  65.     PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP )
  66.     PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN )
  67.     PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT )
  68.     PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT )
  69.     PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 )
  70.     PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_BUTTON2 )
  71.     PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_START1 )
  72.     PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_COIN1 )
  73. INPUT_PORTS_END
  74.  
  75.  
  76. static struct MachineDriver machine_driver_dotrikun =
  77. {
  78.     /* basic machine hardware */
  79.     {
  80.         {
  81.             CPU_Z80,
  82.             4000000,         /* 4 Mhz */
  83.             readmem, writemem, readport, writeport,
  84.             interrupt, 1
  85.         }
  86.     },
  87.     60, DEFAULT_60HZ_VBLANK_DURATION,    /* frames per second, vblank duration */
  88.     1,                    /* single CPU, no need for interleaving */
  89.     0,
  90.  
  91.     /* video hardware */
  92.     256, 256, { 0, 256-1, 0, 192-1 },
  93.     0,
  94.     2, 0,
  95.     0,
  96.  
  97.     VIDEO_TYPE_RASTER | VIDEO_SUPPORTS_DIRTY | VIDEO_MODIFIES_PALETTE,
  98.     0,
  99.     0,
  100.     0,
  101.     dotrikun_vh_screenrefresh,
  102.  
  103.     /* sound hardware */
  104.     0, 0, 0, 0
  105. };
  106.  
  107.  
  108. /***************************************************************************
  109.  
  110.   Game driver(s)
  111.  
  112. ***************************************************************************/
  113.  
  114. ROM_START( dotrikun )
  115.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  116.     ROM_LOAD( "14479a.mpr",    0x0000, 0x4000, 0xb77a50db )
  117. ROM_END
  118.  
  119. ROM_START( dotriku2 )
  120.     ROM_REGION( 0x10000, REGION_CPU1 )    /* 64k for code */
  121.     ROM_LOAD( "14479.mpr",    0x0000, 0x4000, 0xa6aa7fa5 )
  122. ROM_END
  123.  
  124.  
  125. GAME( 1990, dotrikun, 0,        dotrikun, dotrikun, 0, ROT0, "Sega", "Dottori Kun (new version)" )
  126. GAME( 1990, dotriku2, dotrikun, dotrikun, dotrikun, 0, ROT0, "Sega", "Dottori Kun (old version)" )
  127.